home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
chown.z
/
chown
Wrap
Text File
|
1998-10-20
|
4KB
|
133 lines
cccchhhhoooowwwwnnnn((((1111)))) cccchhhhoooowwwwnnnn((((1111))))
NNNNAAAAMMMMEEEE
_cccc_hhhh_oooo_wwww_nnnn, _cccc_hhhh_gggg_rrrr_pppp - change owner or group
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
cccchhhhoooowwwwnnnn [ ----RRRRffffhhhh ] owner[{.|:}group] file ...
cccchhhhggggrrrrpppp [ ----RRRRffffhhhh ] group file ...
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
cccchhhhoooowwwwnnnn changes the owner of the _f_i_l_e_s to _o_w_n_e_r. The owner may be either a
decimal user ID or a login name found in the password file. An optional
group, separated from the owner by either a period or a colon, may also
be specified. The group may be either a decimal group ID or a group name
found in the group file.
cccchhhhggggrrrrpppp changes the group ID of the _f_i_l_e_s to _g_r_o_u_p. The group may be
either a decimal group ID or a group name found in the group file.
No errors, except for usage errors, are reported when the ----ffff (force)
option is given.
When the ----RRRR option is given, the command recursively descends its
directory arguments setting the specified owner or group. When symbolic
links are encountered and the ----hhhh option is not given, they are traversed
and the owner/group of the file referenced by the symbolic link is
changed.
When the ----hhhh option is given and the file is a symbolic link, change the
owner/group of the symbolic link. Without this option, the owner/group
of the file referenced by the symbolic link is changed.
If either command is invoked by other than the superuser, the set-user-ID
and set-group-ID bits of the file mode, 04000 and 02000 respectively,
will be cleared.
Only the owner of a file (or the superuser) may change the owner or group
of that file.
However, if the variable _r_e_s_t_r_i_c_t_e_d__c_h_o_w_n is enabled (see _iiii_nnnn_tttt_rrrr_oooo(2) and
_ssss_yyyy_ssss_tttt_uuuu_nnnn_eeee(1M)) then only the superuser can change the owner of the file,
because if users were able to give files away, they could defeat the file
space accounting procedures. The owner of the file may change the group
ownership only to those groups of which he is a member.
FFFFIIIILLLLEEEESSSS
/etc/passwd
/etc/group
NNNNOOOOTTTTEEEESSSS
Because cccchhhhoooowwwwnnnn uses a depth-first algorithm to recursively descend its
directory arguments, there is a limitation to how deep it can descend
which is dependent on the number of file descriptors available to a given
PPPPaaaaggggeeee 1111
cccchhhhoooowwwwnnnn((((1111)))) cccchhhhoooowwwwnnnn((((1111))))
shell. _ffff_iiii_nnnn_dddd(1) can be used if one needs to descend deeper than a given
configuration will allow.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
chmod(1), find(1), chown(2), group(4), passwd(4), stat(4).
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
_cccc_hhhh_oooo_wwww_nnnn and _cccc_hhhh_gggg_rrrr_pppp will exit with a status of 0 if all file operations
completed successfully. If there are any failures, the exit status will
be > 0.
PPPPaaaaggggeeee 2222